package org.jeecg.modules.pjinfo.mapper;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.pjinfo.entity.PjInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: PJ_INFO
 * @Author: jeecg-boot
 * @Date:   2021-08-24
 * @Version: V1.0
 */
public interface PjInfoMapper extends BaseMapper<PjInfo> {

    @Select("select user_id as id from sys_user_depart  where dep_id = '${bmcode}' ")
    List<Map<String, Object>> getuser( @Param("bmcode") String bmcode);

    List<PjInfo> querypjinfoshlist(Page<PjInfo> pageList,  @Param("pjInfo")  PjInfo pjInfo);

    List<PjInfo> querypjinfolists(Page<PjInfo> pageList,  @Param("pjInfo") PjInfo pjInfo);

    @Select("select id from sys_depart where org_code = '${bmcode}'")
    String getdepid(String bmcode);

    @Select("select id,realname from sys_user  where id  = '${id}' and del_flag ='0' and status = '1' ")
    List<Map<String,Object>> getinfobyuserid(String id);

    @Select("select id,realname from sys_user where  dbms_lob.instr(depart_ids,'${pjBm}') > 0  ")
    List<Map<String,Object>> getuseridbydepart(String pjBm);
}
